-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat-44] : 인증 메일 전송 및 검증 기능 구현 #45
base: develop
Are you sure you want to change the base?
Conversation
메일 인증은 무리 없어 보이는데 redis config 확인 하시고 로그인이랑 같이 머지 하시면 좋을거 같아요 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 큰문제 없어 보입니다
public ApiResponse<MailSend> mailSend(@RequestBody MailRequestDTO.MailSend request) { | ||
String code = emailService.makeVerificationCode(); | ||
String email = request.getEmail(); | ||
MailSend mailSend = emailService.sendVerificationEmail(email, code); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
메일인증코드 만들어서 바로 서비스에서 보낼수 있지 않을까여 비즈니스로직은 service에서 동작하는게 좋을거 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
service단에서 로직을 전부 처리하도록 수정했습니다.
|
||
public String getVerificationMessage(String verificationCode) { | ||
StringBuffer verificationMessage = new StringBuffer(); | ||
verificationMessage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나중에 근로생중 누군가 메일 폼 만들어 줄겁니다. 나중되면 그걸로 수정합시다
public MailSend integratedProcee(String email) { | ||
String code = makeVerificationCode(); | ||
return sendVerificationEmail(email, code); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
service단에서 모두 처리할 수 있도록 새로 추가한 '메일 전송 과정을 통합해서 실행'하는 메소드 입니다.
#️⃣ 요약 설명
📝 작업 내용
코드에 대한 간단한 설명 부탁드립니다.
6자리 랜덤 코드 생성 후 메일 전송
(key -> Email:이메일 : value -> 6자리 코드) 형태로 redis에 10분간 저장
동작 확인
메일 검증은 인증번호가 맞으면 true, 맞지 않거나 만료된 것이면 false 반환
💬 리뷰 요구사항(선택)